Skip to content

[show][muxcable] add some new commands health, reset-cause, queue_info support for muxcable#2853

Merged
yxieca merged 3 commits intosonic-net:202205from
vdahiya12:202205-b
May 30, 2023
Merged

[show][muxcable] add some new commands health, reset-cause, queue_info support for muxcable#2853
yxieca merged 3 commits intosonic-net:202205from
vdahiya12:202205-b

Conversation

@vdahiya12
Copy link
Contributor

cherry-pick conflict #2414

This PR adds the support for adding some utility commands for muxacble This includes commands for health, operationtime, queueinfo, resetcause

vdahiya@sonic:~$ show mux health Ethernet4
PORT ATTR HEALTH


Ethernet4 health_check Ok
vdahiya@sonic:~$ show mux health Ethernet4 --json
{
"health_check": "Ok"
}

vdahiya@sonic:$ show mux operation Ethernet4 --json {
"operation_time": "22:22"
}
vdahiya@sonic:
$ show mux operation Ethernet4
PORT ATTR OPERATION_TIME


Ethernet4 operation_time 22:22
vdahiya@sonic:~$

vdahiya@sonic:~$ show mux resetcause Ethernet4
PORT ATTR RESETCAUSE


Ethernet4 reset_cause 0

vdahiya@sonic:~$ show mux resetcause Ethernet4 --json {
"reset_cause": "0"
}

vdahiya@sonic:~$ show mux queueinfo Ethernet4 --json {
"Remote": "{'VSC': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 0, 'node_size': 0}, 'UART1': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 209870, 'node_size': 1682183}, 'UART2': {'r_ptr': 13262, 'w_ptr': 3, 'total_count': 0, 'free_count': 0, 'buff_addr': 12, 'node_size': 0}}",
"Local": "{'VSC': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 0, 'node_size': 0}, 'UART1': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 209870, 'node_size': 1682183}, 'UART2': {'r_ptr': 13262, 'w_ptr': 3, 'total_count': 0, 'free_count': 0, 'buff_addr': 12, 'node_size': 0}}"
}

What I did

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

vdahiya12 and others added 3 commits May 26, 2023 19:51
…o support for muxcable (sonic-net#2414)

This PR adds the support for adding some utility commands for muxacble
This includes commands for health, operationtime, queueinfo, resetcause

vdahiya@sonic:~$ show mux health Ethernet4
PORT          ATTR               HEALTH
---------     ---------------   --------
Ethernet4     health_check       Ok
vdahiya@sonic:~$ show mux health Ethernet4 --json
{
    "health_check": "Ok"
}

vdahiya@sonic:~$ show mux operation Ethernet4 --json
{
    "operation_time": "22:22"
}
vdahiya@sonic:~$ show mux operation Ethernet4
PORT       ATTR              OPERATION_TIME
---------  --------------  ----------------
Ethernet4  operation_time                 22:22
vdahiya@sonic:~$

vdahiya@sonic:~$ show mux resetcause Ethernet4
PORT       ATTR           RESETCAUSE
---------  -----------  ------------
Ethernet4  reset_cause             0

vdahiya@sonic:~$ show mux resetcause Ethernet4 --json
{
    "reset_cause": "0"
}

vdahiya@sonic:~$ show mux queueinfo Ethernet4 --json
{
    "Remote": "{'VSC': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 0, 'node_size': 0}, 'UART1': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 209870, 'node_size': 1682183}, 'UART2': {'r_ptr': 13262, 'w_ptr': 3, 'total_count': 0, 'free_count': 0, 'buff_addr': 12, 'node_size': 0}}",
    "Local": "{'VSC': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 0, 'node_size': 0}, 'UART1': {'r_ptr': 0, 'w_ptr': 0, 'total_count': 0, 'free_count': 0, 'buff_addr': 209870, 'node_size': 1682183}, 'UART2': {'r_ptr': 13262, 'w_ptr': 3, 'total_count': 0, 'free_count': 0, 'buff_addr': 12, 'node_size': 0}}"
}
Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav dahiya <vdahiya@microsoft.com>
Copy link
Contributor

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vdahiya12 vdahiya12 requested a review from yxieca May 30, 2023 23:07
@yxieca yxieca merged commit cd08aa6 into sonic-net:202205 May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants